<template >
    <template v-for="list in dataList" :key="list.id">
        <el-submenu :index="list.path" v-if="list.children">
            <template #title>
                <i :class="list.icon"></i>
                <span>{{list.meta.title}}</span>
            </template>
            <menu-tree :dataList="list.children"></menu-tree>
        </el-submenu>
        <el-menu-item v-else :index="list.path">
            <i :class="list.icon"></i>
            <span>{{list.meta.title}}</span>
        </el-menu-item>

    </template>

</template>

<script>
    export default {
        name: "menuTree",
        props: ['dataList'],
        setup(){

        }
    }
</script>

<style scoped>

</style>